#include<iostream>
#include<vector>
using namespace std;
int main()
{
	vector<int> apple;
	for (int i = 0; i < 10; ++i)
	{
		int n;
		cin >> n;
		apple.push_back(n);
	}
	int h; int cnt = 0;
	cin >> h;
	for (int i = 0; i < 10; ++i)
	{
		if (apple[i] <= h + 30)
		{
			++cnt;
		}
	}
	cout << cnt << endl;
	return 0;
}